home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickDraw3D 1.6 SDK / Mac Interfaces / PInterfaces / RAVE.p < prev    next >
Encoding:
Text File  |  1999-05-18  |  52.7 KB  |  1,266 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        RAVE.p
  3.  
  4.      Contains:    Interface for RAVE (Renderer Acceleration Virtual Engine)                            
  5.  
  6.      Version:    Technology:    Quickdraw 3D 1.6
  7.                  Release:    QuickTime 4.0
  8.  
  9.      Copyright:    Â© 1995-1999 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT RAVE;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __RAVE__}
  27. {$SETC __RAVE__ := 1}
  28.  
  29. {$I+}
  30. {$SETC RAVEIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __CONDITIONALMACROS__}
  34. {$I ConditionalMacros.p}
  35. {$ENDC}
  36.  
  37. {$IFC TARGET_OS_MAC }
  38. {$IFC UNDEFINED __MACTYPES__}
  39. {$I MacTypes.p}
  40. {$ENDC}
  41. {$IFC UNDEFINED __QUICKDRAW__}
  42. {$I Quickdraw.p}
  43. {$ENDC}
  44. {$IFC UNDEFINED __QDOFFSCREEN__}
  45. {$I QDOffscreen.p}
  46. {$ENDC}
  47.  
  48. {$ENDC}  {TARGET_OS_MAC}
  49.  
  50. {$IFC TARGET_OS_WIN32 }
  51. {$IFC UNDEFINED RAVE_NO_DIRECTDRAW }
  52. {$ENDC}
  53. {$ENDC}  {TARGET_OS_WIN32}
  54.  
  55.  
  56. {$PUSH}
  57. {$ALIGN POWER}
  58. {$LibExport+}
  59.  
  60. {$SETC RAVE_OBSOLETE := 0 }
  61. {*****************************************************************************
  62.  *
  63.  * Platform dependent datatypes: TQAImagePixelType, TQADevice, TQAClip, and TQARect.
  64.  *
  65.  ****************************************************************************}
  66.  
  67. TYPE
  68.     TQAImagePixelType             = SInt32;
  69. CONST
  70.     kQAPixel_Alpha1                = 0;                            {  1 bit/pixel alpha  }
  71.     kQAPixel_RGB16                = 1;                            {  16 bits/pixel, R=14:10, G=9:5, B=4:0  }
  72.     kQAPixel_ARGB16                = 2;                            {  16 bits/pixel, A=15, R=14:10, G=9:5, B=4:0  }
  73.     kQAPixel_RGB32                = 3;                            {  32 bits/pixel, R=23:16, G=15:8, B=7:0  }
  74.     kQAPixel_ARGB32                = 4;                            {  32 bits/pixel, A=31:24, R=23:16, G=15:8, B=7:0  }
  75.     kQAPixel_CL4                = 5;                            {  4 bit color look up table, always big endian, ie high 4 bits effect left pixel  }
  76.     kQAPixel_CL8                = 6;                            {  8 bit color look up table  }
  77.     kQAPixel_RGB16_565            = 7;                            {  Win32 ONLY  16 bits/pixel, no alpha, R:5, G:6, B:5  }
  78.     kQAPixel_RGB24                = 8;                            {  Win32 ONLY  24 bits/pixel, no alpha, R:8, G:8, B:8  }
  79.     kQAPixel_RGB8_332            = 9;                            {  8 bits/pixel, R=7:5, G = 4:2, B = 1:0  }
  80.     kQAPixel_ARGB16_4444        = 10;                            {  16 bits/pixel, A=15:12, R=11:8, G=7:4, B=3:0  }
  81.     kQAPixel_ACL16_88            = 11;                            {  16 bits/pixel, A=15:8, CL=7:0, 8 bit alpha + 8 bit color lookup  }
  82.     kQAPixel_I8                    = 12;                            {  8 bits/pixel, I=7:0, intensity map (grayscale)  }
  83.     kQAPixel_AI16_88            = 13;                            {  16 bits/pixel, A=15:8, I=7:0, intensity map (grayscale)  }
  84.     kQAPixel_YUVS                = 14;                            {  16 bits/pixel, QD's kYUVSPixelFormat (4:2:2, YUYV ordering, unsigned UV)  }
  85.     kQAPixel_YUVU                = 15;                            {  16 bits/pixel, QD's kYUVUPixelFormat (4:2:2, YUYV ordering, signed UV)  }
  86.     kQAPixel_YVYU422            = 16;                            {  16 bits/pixel, QD's kYVYU422PixelFormat (4:2:2, YVYU ordering, unsigned UV)  }
  87.     kQAPixel_UYVY422            = 17;                            {  16 bits/pixel, QD's kUYVY422PixelFormat (4:2:2, UYVY ordering, unsigned UV)  }
  88.  
  89.  
  90. TYPE
  91.     TQAColorTableType             = SInt32;
  92. CONST
  93.     kQAColorTable_CL8_RGB32        = 0;                            {  256 entry, 32 bit/pixel, R=23:16, G=15:8, B=7:0  }
  94.     kQAColorTable_CL4_RGB32        = 1;                            {  16 entry, 32 bit/pixel, R=23:16, G=15:8, B=7:0  }
  95.  
  96. { Selects target device type }
  97.  
  98. TYPE
  99.     TQADeviceType                 = SInt32;
  100. CONST
  101.     kQADeviceMemory                = 0;                            {  Memory draw context  }
  102.     kQADeviceGDevice            = 1;                            {  Macintosh GDevice draw context  }
  103.     kQADeviceWin32DC            = 2;                            {  Win32 DC  }
  104.     kQADeviceDDSurface            = 3;                            {  Win32 DirectDraw Surface  }
  105.  
  106. { Generic memory pixmap device }
  107.  
  108. TYPE
  109.     TQADeviceMemoryPtr = ^TQADeviceMemory;
  110.     TQADeviceMemory = RECORD
  111.         rowBytes:                LONGINT;                                {  Rowbytes  }
  112.         pixelType:                TQAImagePixelType;                        {  Depth, color space, etc.  }
  113.         width:                    LONGINT;                                {  Width in pixels  }
  114.         height:                    LONGINT;                                {  Height in pixels  }
  115.         baseAddr:                Ptr;                                    {  Base address of pixmap  }
  116.     END;
  117.  
  118. { Offscreen Device }
  119.     TQADeviceOffscreenPtr = ^TQADeviceOffscreen;
  120.     TQADeviceOffscreen = RECORD
  121.         pixelType:                TQAImagePixelType;                        {  Depth, color space, etc.  }
  122.     END;
  123.  
  124. { Selects target clip type }
  125.     TQAClipType                 = SInt32;
  126. CONST
  127.     kQAClipRgn                    = 0;                            {  Macintosh clipRgn with serial number  }
  128.     kQAClipWin32Rgn                = 1;                            {  Win32 clip region  }
  129.  
  130.  
  131. TYPE
  132.     TQARectPtr = ^TQARect;
  133.     TQARect = RECORD
  134.         left:                    LONGINT;
  135.         right:                    LONGINT;
  136.         top:                    LONGINT;
  137.         bottom:                    LONGINT;
  138.     END;
  139.  
  140. {$IFC TARGET_OS_MAC }
  141.     TQAPlatformDevicePtr = ^TQAPlatformDevice;
  142.     TQAPlatformDevice = RECORD
  143.         CASE INTEGER OF
  144.         0: (
  145.             memoryDevice:        TQADeviceMemory;
  146.             );
  147.         1: (
  148.             gDevice:            GDHandle;
  149.             );
  150.     END;
  151.  
  152.     TQAPlatformClipPtr = ^TQAPlatformClip;
  153.     TQAPlatformClip = RECORD
  154.         CASE INTEGER OF
  155.         0: (
  156.             clipRgn:            RgnHandle;
  157.             );
  158.     END;
  159.  
  160. {$IFC TYPED_FUNCTION_POINTERS}
  161.     TQADrawNotificationProcPtr = PROCEDURE(left: INTEGER; top: INTEGER; right: INTEGER; bottom: INTEGER; refCon: LONGINT);
  162. {$ELSEC}
  163.     TQADrawNotificationProcPtr = ProcPtr;
  164. {$ENDC}
  165.  
  166.     TQADrawNotificationProcRefNum        = LONGINT;
  167. { used to unregister your proc }
  168. {$ELSEC}
  169. {$IFC TARGET_OS_WIN32 }
  170. {$ELSEC}
  171. {
  172.      * Generic platform supports memory device only. TQARect is generic. TQAClip is ???.
  173.      }
  174.     TQAPlatformDevice = RECORD
  175.         CASE INTEGER OF
  176.         0: (
  177.             memoryDevice:        TQADeviceMemory;
  178.             );
  179.     END;
  180.  
  181.     TQAPlatformClip = RECORD
  182.         CASE INTEGER OF
  183.         0: (
  184.             region:                Ptr;                                    {  ???  }
  185.             );
  186.     END;
  187.  
  188. {$ENDC}
  189. {$ENDC}
  190.  
  191.     TQADevicePtr = ^TQADevice;
  192.     TQADevice = RECORD
  193.         deviceType:                TQADeviceType;
  194.         device:                    TQAPlatformDevice;
  195.     END;
  196.  
  197.     TQAClipPtr = ^TQAClip;
  198.     TQAClip = RECORD
  199.         clipType:                TQAClipType;
  200.         clip:                    TQAPlatformClip;
  201.     END;
  202.  
  203. {*****************************************************************************
  204.  *
  205.  * Basic data types.
  206.  *
  207.  ****************************************************************************}
  208.  
  209.     TQAEngine = ^LONGINT; { an opaque 32-bit type }
  210.     TQAEnginePtr = ^LONGINT; { an opaque 32-bit type }
  211.     TQATexture = ^LONGINT; { an opaque 32-bit type }
  212.     TQATexturePtr = ^LONGINT; { an opaque 32-bit type }
  213.     TQABitmap = ^LONGINT; { an opaque 32-bit type }
  214.     TQABitmapPtr = ^LONGINT; { an opaque 32-bit type }
  215.     TQADrawPrivate = ^LONGINT; { an opaque 32-bit type }
  216.     TQADrawPrivatePtr = ^LONGINT; { an opaque 32-bit type }
  217.     TQAColorTable = ^LONGINT; { an opaque 32-bit type }
  218.     TQAColorTablePtr = ^LONGINT; { an opaque 32-bit type }
  219. { A single triangle element for QADrawTriMesh }
  220.     TQAIndexedTrianglePtr = ^TQAIndexedTriangle;
  221.     TQAIndexedTriangle = RECORD
  222.         triangleFlags:            UInt32;                                    {  Triangle flags, see kQATriFlags_  }
  223.         vertices:                ARRAY [0..2] OF UInt32;                    {  Indices into a vertex array  }
  224.     END;
  225.  
  226. { An image for use as texture or bitmap }
  227.     TQAImagePtr = ^TQAImage;
  228.     TQAImage = RECORD
  229.         width:                    LONGINT;                                {  Width of pixmap  }
  230.         height:                    LONGINT;                                {  Height of pixmap  }
  231.         rowBytes:                LONGINT;                                {  Rowbytes of pixmap  }
  232.         pixmap:                    Ptr;                                    {  Pixmap  }
  233.     END;
  234.  
  235. { a pixel buffer }
  236.     TQAPixelBuffer                        = TQADeviceMemory;
  237.     TQAPixelBufferPtr                     = ^TQAPixelBuffer;
  238. { a zbuffer }
  239.     TQAZBufferPtr = ^TQAZBuffer;
  240.     TQAZBuffer = RECORD
  241.         width:                    LONGINT;                                {  Width of pixmap  }
  242.         height:                    LONGINT;                                {  Height of pixmap  }
  243.         rowBytes:                LONGINT;                                {  Rowbytes of pixmap  }
  244.         zbuffer:                Ptr;                                    {  pointer to the zbuffer data  }
  245.         zDepth:                    LONGINT;                                {  bit depth of zbuffer (16,24,32...)  }
  246.         isBigEndian:            LONGINT;                                {  true if zbuffer values are in big-endian format, false if little-endian  }
  247.     END;
  248.  
  249. { Standard error type }
  250.     TQAError                     = SInt32;
  251. CONST
  252.     kQANoErr                    = 0;                            {  No error  }
  253.     kQAError                    = 1;                            {  Generic error flag  }
  254.     kQAOutOfMemory                = 2;                            {  Insufficient memory  }
  255.     kQANotSupported                = 3;                            {  Requested feature is not supported  }
  256.     kQAOutOfDate                = 4;                            {  A newer drawing engine was registered  }
  257.     kQAParamErr                    = 5;                            {  Error in passed parameters  }
  258.     kQAGestaltUnknown            = 6;                            {  Requested gestalt type isn't available  }
  259.     kQADisplayModeUnsupported    = 7;                            {  Engine cannot render to the display in its current ,  }
  260.                                                                 {  mode, but could if it were in some other mode  }
  261.     kQAOutOfVideoMemory            = 8;                            {  There is not enough VRAM to support the desired context dimensions  }
  262.  
  263. { TQABoolean }
  264.  
  265. TYPE
  266.     TQABoolean                            = UInt8;
  267. {***********************************************************************************************
  268.  *
  269.  * Vertex data types.
  270.  *
  271.  **********************************************************************************************}
  272. {
  273.  * TQAVGouraud is used for Gouraud shading. Each vertex specifies position, color and Z.
  274.  *
  275.  * Alpha is always treated as indicating transparency. Drawing engines which don't
  276.  * support Z-sorted rendering use the back-to-front transparency blending functions
  277.  * shown below. (ARGBsrc are the source (new) values, ARGBdest are  the destination
  278.  * (previous) pixel values.)
  279.  *
  280.  *        Premultiplied                            Interpolated
  281.  *
  282.  *        A = 1 - (1 - Asrc) * (1 - Adest)        A = 1 - (1 - Asrc) * (1 - Adest) 
  283.  *        R = (1 - Asrc) * Rdest + Rsrc            R = (1 - Asrc) * Rdest + Asrc * Rsrc
  284.  *        G = (1 - Asrc) * Gdest + Gsrc            G = (1 - Asrc) * Gdest + Asrc * Gsrc
  285.  *        B = (1 - Asrc) * Bdest + Bsrc            B = (1 - Asrc) * Bdest + Asrc * Bsrc
  286.  *
  287.  * Note that the use of other blending modes to implement antialiasing is performed
  288.  * automatically by the drawing engine when the kQATag_Antialias variable !=
  289.  * kQAAntiAlias_Fast. The driving software should continue to use the alpha fields
  290.  * for transparency even when antialiasing is being used (the drawing engine will
  291.  * resolve the multiple blending requirements as best as it can).
  292.  *
  293.  * Drawing engines which perform front-to-back Z-sorted rendering should replace
  294.  * the blending function shown above with the equivalent front-to-back formula.
  295.  }
  296.     TQAVGouraudPtr = ^TQAVGouraud;
  297.     TQAVGouraud = RECORD
  298.         x:                        Single;                                    {  X pixel coordinate, 0.0 <= x < width  }
  299.         y:                        Single;                                    {  Y pixel coordinate, 0.0 <= y < height  }
  300.         z:                        Single;                                    {  Z coordinate, 0.0 <= z <= 1.0  }
  301.         invW:                    Single;                                    {  1 / w; required only when kQAPerspectiveZ_On is set  }
  302.         r:                        Single;                                    {  Red, 0.0 <= r <= 1.0  }
  303.         g:                        Single;                                    {  Green, 0.0 <= g <= 1.0  }
  304.         b:                        Single;                                    {  Blue, 0.0 <= b <= 1.0  }
  305.         a:                        Single;                                    {  Alpha, 0.0 <= a <= 1.0, 1.0 is opaque  }
  306.     END;
  307.  
  308. {
  309.  * TQAVTexture is used for texture mapping. The texture mapping operation
  310.  * is controlled by the kQATag_TextureOp variable, which is a mask of
  311.  * kQATextureOp_None/Modulate/Highlight/Decal. Below is pseudo-code for the
  312.  * texture shading operation:
  313.  *
  314.  *        texPix = TextureLookup (uq/q, vq/q);
  315.  *        if (kQATextureOp_Decal)
  316.  *        (
  317.  *            texPix.r = texPix.a * texPix.r + (1 - texPix.a) * r;
  318.  *            texPix.g = texPix.a * texPix.g + (1 - texPix.a) * g;
  319.  *            texPix.b = texPix.a * texPix.b + (1 - texPix.a) * b;
  320.  *            texPix.a = a;
  321.  *        )
  322.  *        else
  323.  *        (
  324.  *            texPix.a = texPix.a * a;
  325.  *        )
  326.  *        if (kQATextureOp_Modulate)
  327.  *        (
  328.  *            texPix.r *= kd_r;        // Clamped to prevent overflow
  329.  *            texPix.g *= kd_g;        // Clamped to prevent overflow
  330.  *            texPix.b *= kd_b;        // Clamped to prevent overflow
  331.  *        )
  332.  *        if (kQATextureOp_Highlight)
  333.  *        (
  334.  *            texPix.r += ks_r;        // Clamped to prevent overflow
  335.  *            texPix.g += ks_g;        // Clamped to prevent overflow
  336.  *            texPix.b += ks_b;        // Clamped to prevent overflow
  337.  *        )
  338.  *
  339.  * After computation of texPix, transparency blending (as shown
  340.  * above for TQAVGouraud) is performed.
  341.  }
  342.     TQAVTexturePtr = ^TQAVTexture;
  343.     TQAVTexture = RECORD
  344.         x:                        Single;                                    {  X pixel coordinate, 0.0 <= x < width  }
  345.         y:                        Single;                                    {  Y pixel coordinate, 0.0 <= y < height  }
  346.         z:                        Single;                                    {  Z coordinate, 0.0 <= z <= 1.0  }
  347.         invW:                    Single;                                    {  1 / w (always required)  }
  348.                                                                         {  rgb are used only when kQATextureOp_Decal is set. a is always required  }
  349.         r:                        Single;                                    {  Red, 0.0 <= r <= 1.0  }
  350.         g:                        Single;                                    {  Green, 0.0 <= g <= 1.0  }
  351.         b:                        Single;                                    {  Blue, 0.0 <= b <= 1.0  }
  352.         a:                        Single;                                    {  Alpha, 0.0 <= a <= 1.0, 1.0 is opaque  }
  353.                                                                         {  uOverW and vOverW are required by all modes  }
  354.         uOverW:                    Single;                                    {  u / w  }
  355.         vOverW:                    Single;                                    {  v / w  }
  356.                                                                         {  kd_r/g/b are used only when kQATextureOp_Modulate is set  }
  357.         kd_r:                    Single;                                    {  Scale factor for texture red, 0.0 <= kd_r  }
  358.         kd_g:                    Single;                                    {  Scale factor for texture green, 0.0 <= kd_g  }
  359.         kd_b:                    Single;                                    {  Scale factor for texture blue, 0.0 <= kd_b  }
  360.                                                                         {  ks_r/g/b are used only when kQATextureOp_Highlight is set  }
  361.         ks_r:                    Single;                                    {  Red specular highlight, 0.0 <= ks_r <= 1.0  }
  362.         ks_g:                    Single;                                    {  Green specular highlight, 0.0 <= ks_g <= 1.0  }
  363.         ks_b:                    Single;                                    {  Blue specular highlight, 0.0 <= ks_b <= 1.0  }
  364.     END;
  365.  
  366. {
  367. *  TQAVMultiTexture allows you to specify the uv and invW values
  368. *  for secondary textures.  This data is submitted with the
  369. *  QASubmitMultiTextureParams() call.
  370. }
  371.     TQAVMultiTexturePtr = ^TQAVMultiTexture;
  372.     TQAVMultiTexture = RECORD
  373.         invW:                    Single;
  374.         uOverW:                    Single;
  375.         vOverW:                    Single;
  376.     END;
  377.  
  378.  
  379. {***********************************************************************************************
  380.  *
  381.  * Constants used for the state variables.
  382.  *
  383.  **********************************************************************************************}
  384. {
  385.  * kQATag_xxx is used to select a state variable when calling QASetFloat(), QASetInt(),
  386.  * QAGetFloat() and QAGetInt(). The kQATag values are split into three separate enumerated
  387.  * types: TQATagInt, TQATagPtr and TQATagFloat. TQATagInt is used for the QASet/GetInt()
  388.  * functions, TQATagPtr is used for the QASet/GetPtr() functions, and TQATagFloat is used for 
  389.  * the QASet/GetFloat() functions. (This is so that a compiler that typechecks enums can flag
  390.  * a float/int tag mismatch during compile.)
  391.  *
  392.  * -=- All tag values must be unique even across all three types. -=-
  393.  *
  394.  * These variables are required by all drawing engines:
  395.  *        kQATag_ZFunction            (Int)    One of kQAZFunction_xxx
  396.  *        kQATag_ColorBG_a            (Float)    Background color alpha
  397.  *        kQATag_ColorBG_r            (Float)    Background color red
  398.  *        kQATag_ColorBG_g            (Float)    Background color green
  399.  *        kQATag_ColorBG_b            (Float)    Background color blue
  400.  *        kQATag_Width                (Float)    Line and point width (pixels)
  401.  *        kQATag_ZMinOffset            (Float)    Min offset to Z to guarantee visibility (Read only!)
  402.  *        kQATag_ZMinScale            (Float)    Min scale to Z to guarantee visibility (Read only!)
  403.  
  404.  * These variables are used for optional features:
  405.  *        kQATag_Antialias            (Int)    One of kQAAntiAlias_xxx
  406.  *        kQATag_Blend                (Int)    One of kQABlend_xxx
  407.  *        kQATag_PerspectiveZ            (Int)    One of kQAPerspectiveZ_xxx
  408.  *        kQATag_TextureFilter        (Int)    One of kQATextureFilter_xxx
  409.  *        kQATag_TextureOp            (Int)    Mask of kQATextureOp_xxx
  410.  *        kQATag_Texture                (Ptr)    Pointer to current TQATexture
  411.  *        kQATag_CSGTag                (Int)    One of kQACSGTag_xxx
  412.  *        kQATag_CSGEquation            (Int)    32 bit CSG truth table
  413.  *        kQATag_FogMode                (Int)   One of kQAFogMode_xxxx
  414.  *        kQATag_FogColor_a            (Float) Fog color alpha
  415.  *        kQATag_FogColor_r            (Float) Fog color red
  416.  *        kQATag_FogColor_g            (Float) Fog color green
  417.  *        kQATag_FogColor_b            (Float) Fog color blue
  418.  *        kQATag_FogStart                (Float) Fog start
  419.  *        kQATag_FogEnd                (Float) Fog end
  420.  *        kQATag_FogDensity            (Float) Fog density
  421.  *        kQATag_FogMaxDepth            (Float) Maximun value for 1.0 / invW
  422.  *        kQATag_MipmapBias             (Float) The mipmap page bias factor
  423.  *        kQATag_ChannelMask            (Int) one of kQAChannelMask_xxx
  424.  *        kQATag_ZBufferMask            (Int) one of kQAZBufferMask_xxx
  425.  *        kQATag_ZSortedHint            (Int) 1 = depth sort transparent triangles, 0 = do not sort.
  426.  *        kQATag_Chromakey_r            (Float) chroma key red
  427.  *        kQATag_Chromakey_g            (Float) chroma key green
  428.  *        kQATag_Chromakey_b            (Float) chroma key blue
  429.  *        kQATag_ChromakeyEnable        (Int) 1 = enable chroma keying, 0 = disable chroma keying
  430.  *        kQATag_AlphaTestFunc        (Int) one of kQAAlphaTest_xxx
  431.  *        kQATag_AlphaTestRef            (Float) from 0 to 1
  432.  *        kQATag_DontSwap                (Int) 1 = dont swap buffers during QARenderEnd, 0 = do swap buffers during QARenderEnd.
  433.  
  434.  *      kQATag_MultiTextureOp       (Int) One of kQAMultiTexture_xxx
  435.  *        kQATag_MultiTextureFilter   (Int) One of kQATextureFilter_xxx
  436.  *        kQATag_MultiTextureCurrent    (Int) which multitexture layer to use for all other multitexture funcs
  437.  *        kQATag_MultiTextureEnable    (Int) how many multitexture layers to use (0 = no multitexturing).
  438.  *        kQATag_MultiTextureWrapU    (Int)
  439.  *        kQATag_MultiTextureWrapV    (Int)
  440.  *        kQATag_MultiTextureMagFilter (Int)
  441.  *        kQATag_MultiTextureMinFilter (Int)
  442.  *        kQATag_MultiTextureBorder_a    (Float)
  443.  *        kQATag_MultiTextureBorder_r    (Float)
  444.  *        kQATag_MultiTextureBorder_g    (Float)
  445.  *        kQATag_MultiTextureBorder_b    (Float)
  446.  *        kQATag_MultiTextureMipmapBias (Float)
  447.  *        kQATag_MultiTextureFactor     (Float) used with kQAMultiTexture_Fixed to determine blending factor
  448.  *
  449.  * These variables are used for OpenGLâ„¢ support:
  450.  *        kQATagGL_DrawBuffer            (Int)    Mask of kQAGL_DrawBuffer_xxx
  451.  *        kQATagGL_TextureWrapU        (Int)    kQAGL_Clamp or kQAGL_Repeat
  452.  *        kQATagGL_TextureWrapV        (Int)    kQAGL_Clamp or kQAGL_Repeat
  453.  *        kQATagGL_TextureMagFilter    (Int)    kQAGL_Nearest or kQAGL_Linear
  454.  *        kQATagGL_TextureMinFilter    (Int)    kQAGL_Nearest, etc.
  455.  *        kQATagGL_ScissorXMin        (Int)    Minimum X value for scissor rectangle
  456.  *        kQATagGL_ScissorYMin        (Int)    Minimum Y value for scissor rectangle
  457.  *        kQATagGL_ScissorXMax        (Int)    Maximum X value for scissor rectangle
  458.  *        kQATagGL_ScissorYMax        (Int)    Maximum Y value for scissor rectangle
  459.  *        kQATagGL_BlendSrc            (Int)    Source blending operation
  460.  *        kQATagGL_BlendDst            (Int)    Destination blending operation
  461.  *        kQATagGL_LinePattern        (Int)    Line rasterization pattern
  462.  *        kQATagGL_AreaPattern0        (Int)    First of 32 area pattern registers
  463.  *        kQATagGL_AreaPattern31        (Int)    Last of 32 area pattern registers
  464.  *
  465.  *        kQATagGL_DepthBG            (Float)    Background Z
  466.  *        kQATagGL_TextureBorder_a    (Float)    Texture border color alpha
  467.  *        kQATagGL_TextureBorder_r    (Float)    Texture border color red
  468.  *        kQATagGL_TextureBorder_g    (Float)    Texture border color green
  469.  *        kQATagGL_TextureBorder_b    (Float)    Texture border color blue
  470.  *
  471.  * Tags >= kQATag_EngineSpecific_Minimum may be assigned by the vendor for use as
  472.  * engine-specific variables. NOTE: These should be used only in exceptional circumstances,
  473.  * as functions performed by these variables won't be generally accessible. All other tag
  474.  * values are reserved.
  475.  *
  476.  *        kQATag_EngineSpecific_Minimum    Minimum tag value for drawing-engine specific variables
  477.  }
  478.     TQATagInt                     = SInt32;
  479. CONST
  480.     kQATag_ZFunction            = 0;
  481.     kQATag_Antialias            = 8;
  482.     kQATag_Blend                = 9;
  483.     kQATag_PerspectiveZ            = 10;
  484.     kQATag_TextureFilter        = 11;
  485.     kQATag_TextureOp            = 12;
  486.     kQATag_CSGTag                = 14;
  487.     kQATag_CSGEquation            = 15;
  488.     kQATag_BufferComposite        = 16;
  489.     kQATag_FogMode                = 17;
  490.     kQATag_ChannelMask            = 27;
  491.     kQATag_ZBufferMask            = 28;
  492.     kQATag_ZSortedHint            = 29;
  493.     kQATag_ChromakeyEnable        = 30;
  494.     kQATag_AlphaTestFunc        = 31;
  495.     kQATag_DontSwap                = 32;
  496.     kQATag_MultiTextureEnable    = 33;
  497.     kQATag_MultiTextureCurrent    = 34;
  498.     kQATag_MultiTextureOp        = 35;
  499.     kQATag_MultiTextureFilter    = 36;
  500.     kQATag_MultiTextureWrapU    = 37;
  501.     kQATag_MultiTextureWrapV    = 38;
  502.     kQATag_MultiTextureMagFilter = 39;
  503.     kQATag_MultiTextureMinFilter = 40;
  504.     kQATag_BitmapFilter            = 54;                            {  filter to use while scaling bitmaps, one of kQAFilter_xxx  }
  505.     kQATag_DrawContextFilter    = 55;                            {  filter to use while scaling draw contexts, one of kQAFilter_xxx  }
  506.     kQATagGL_DrawBuffer            = 100;
  507.     kQATagGL_TextureWrapU        = 101;
  508.     kQATagGL_TextureWrapV        = 102;
  509.     kQATagGL_TextureMagFilter    = 103;
  510.     kQATagGL_TextureMinFilter    = 104;
  511.     kQATagGL_ScissorXMin        = 105;
  512.     kQATagGL_ScissorYMin        = 106;
  513.     kQATagGL_ScissorXMax        = 107;
  514.     kQATagGL_ScissorYMax        = 108;
  515.     kQATagGL_BlendSrc            = 109;
  516.     kQATagGL_BlendDst            = 110;
  517.     kQATagGL_LinePattern        = 111;
  518.     kQATagGL_AreaPattern0        = 117;                            {  ...kQATagGL_AreaPattern1-30  }
  519.     kQATagGL_AreaPattern31        = 148;
  520.     kQATagGL_LinePatternFactor    = 149;                            {  equivalent to GL_LINE_STIPPLE_REPEAT  }
  521.     kQATag_EngineSpecific_Minimum = 1000;
  522.  
  523.  
  524. TYPE
  525.     TQATagPtr                     = SInt32;
  526. CONST
  527.     kQATag_Texture                = 13;
  528.     kQATag_MultiTexture            = 26;
  529.  
  530.  
  531. TYPE
  532.     TQATagFloat                 = SInt32;
  533. CONST
  534.     kQATag_ColorBG_a            = 1;
  535.     kQATag_ColorBG_r            = 2;
  536.     kQATag_ColorBG_g            = 3;
  537.     kQATag_ColorBG_b            = 4;
  538.     kQATag_Width                = 5;
  539.     kQATag_ZMinOffset            = 6;
  540.     kQATag_ZMinScale            = 7;
  541.     kQATag_FogColor_a            = 18;
  542.     kQATag_FogColor_r            = 19;
  543.     kQATag_FogColor_g            = 20;
  544.     kQATag_FogColor_b            = 21;
  545.     kQATag_FogStart                = 22;
  546.     kQATag_FogEnd                = 23;
  547.     kQATag_FogDensity            = 24;
  548.     kQATag_FogMaxDepth            = 25;
  549.     kQATag_MipmapBias            = 41;
  550.     kQATag_MultiTextureMipmapBias = 42;
  551.     kQATag_Chromakey_r            = 43;
  552.     kQATag_Chromakey_g            = 44;
  553.     kQATag_Chromakey_b            = 45;
  554.     kQATag_AlphaTestRef            = 46;
  555.     kQATag_MultiTextureBorder_a    = 47;
  556.     kQATag_MultiTextureBorder_r    = 48;
  557.     kQATag_MultiTextureBorder_g    = 49;
  558.     kQATag_MultiTextureBorder_b    = 50;
  559.     kQATag_MultiTextureFactor    = 51;
  560.     kQATag_BitmapScale_x        = 52;                            {  horizontal bitmap scale factor, default value is 1.0  }
  561.     kQATag_BitmapScale_y        = 53;                            {  vertical bitmap scale factor, default value is 1.0  }
  562.     kQATag_MultiTextureEnvColor_a = 56;
  563.     kQATag_MultiTextureEnvColor_r = 57;
  564.     kQATag_MultiTextureEnvColor_g = 58;
  565.     kQATag_MultiTextureEnvColor_b = 59;
  566.     kQATagGL_DepthBG            = 112;
  567.     kQATagGL_TextureBorder_a    = 113;
  568.     kQATagGL_TextureBorder_r    = 114;
  569.     kQATagGL_TextureBorder_g    = 115;
  570.     kQATagGL_TextureBorder_b    = 116;
  571.     kQATagGL_TextureEnvColor_a    = 150;
  572.     kQATagGL_TextureEnvColor_r    = 151;
  573.     kQATagGL_TextureEnvColor_g    = 152;
  574.     kQATagGL_TextureEnvColor_b    = 153;
  575.  
  576.  
  577. { kQATag_ZFunction }
  578.     kQAZFunction_None            = 0;                            {  Z is neither tested nor written (same as no Z buffer)  }
  579.     kQAZFunction_LT                = 1;                            {  Znew < Zbuffer is visible  }
  580.     kQAZFunction_EQ                = 2;                            {  Znew == Zbuffer is visible  }
  581.     kQAZFunction_LE                = 3;                            {  Znew <= Zbuffer is visible  }
  582.     kQAZFunction_GT                = 4;                            {  Znew > Zbuffer is visible  }
  583.     kQAZFunction_NE                = 5;                            {  Znew != Zbuffer is visible  }
  584.     kQAZFunction_GE                = 6;                            {  Znew >= Zbuffer is visible  }
  585.     kQAZFunction_True            = 7;                            {  Znew is always visible  }
  586.     kQAZFunction_False            = 8;                            {  Znew is never visible  }
  587.  
  588. { kQATag_Width }
  589.     kQAMaxWidth = 128.0;
  590. { kQATag_Antialias }
  591.     kQAAntiAlias_Off            = 0;
  592.     kQAAntiAlias_Fast            = 1;
  593.     kQAAntiAlias_Mid            = 2;
  594.     kQAAntiAlias_Best            = 3;
  595.  
  596. { kQATag_Blend }
  597.     kQABlend_PreMultiply        = 0;
  598.     kQABlend_Interpolate        = 1;
  599.     kQABlend_OpenGL                = 2;
  600.  
  601. { kQATag_BufferComposite }
  602.     kQABufferComposite_None        = 0;                            {  Default: New pixels overwrite initial buffer contents  }
  603.     kQABufferComposite_PreMultiply = 1;                            {  New pixels are blended with initial buffer contents via PreMultiply  }
  604.     kQABufferComposite_Interpolate = 2;                            {  New pixels are blended with initial buffer contents via Interpolate  }
  605.  
  606. { kQATag_PerspectiveZ }
  607.     kQAPerspectiveZ_Off            = 0;                            {  Use Z for hidden surface removal  }
  608.     kQAPerspectiveZ_On            = 1;                            {  Use InvW for hidden surface removal  }
  609.  
  610. { kQATag_TextureFilter }
  611.                                                                 {  suggested meanings of these values  }
  612.     kQATextureFilter_Fast        = 0;                            {  No filtering, pick nearest  }
  613.     kQATextureFilter_Mid        = 1;                            {  Fastest method that does some filtering  }
  614.     kQATextureFilter_Best        = 2;                            {  Highest quality renderer can do  }
  615.  
  616. { filter tag values }
  617.                                                                 {  suggested meanings of these values  }
  618.     kQAFilter_Fast                = 0;                            {  No filtering, pick nearest  }
  619.     kQAFilter_Mid                = 1;                            {  Fastest method that does some filtering  }
  620.     kQAFilter_Best                = 2;                            {  Highest quality renderer can do  }
  621.  
  622. { kQATag_TextureOp (mask of one or more) }
  623.     kQATextureOp_None            = 0;                            {  Default texture mapping mode  }
  624.     kQATextureOp_Modulate        = $01;                            {  Modulate texture color with kd_r/g/b  }
  625.     kQATextureOp_Highlight        = $02;                            {  Add highlight value ks_r/g/b  }
  626.     kQATextureOp_Decal            = $04;                            {  When texture alpha == 0, use rgb instead  }
  627.     kQATextureOp_Shrink            = $08;                            {  This is a non-wrapping texture, so the ???  }
  628.     kQATextureOp_Blend            = $10;                            {  Same as GL_TEXTURE_ENV_MODE GL_BLEND  }
  629.  
  630. { kQATag_MultiTextureOp }
  631.     kQAMultiTexture_Add            = 0;                            {  texels are added to form final pixel  }
  632.     kQAMultiTexture_Modulate    = 1;                            {  texels are multiplied to form final pixel  }
  633.     kQAMultiTexture_BlendAlpha    = 2;                            {  texels are blended according to 2nd texel's alpha  }
  634.     kQAMultiTexture_Fixed        = 3;                            {  texels are blended by a fixed factor via kQATag_MultiTextureFactor   }
  635.  
  636. { kQATag_CSGTag }
  637.     kQACSGTag_0                    = 0;                            {  Submitted tris have CSG ID 0  }
  638.     kQACSGTag_1                    = 1;                            {  Submitted tris have CSG ID 1  }
  639.     kQACSGTag_2                    = 2;                            {  Submitted tris have CSG ID 2  }
  640.     kQACSGTag_3                    = 3;                            {  Submitted tris have CSG ID 3  }
  641.     kQACSGTag_4                    = 4;                            {  Submitted tris have CSG ID 4  }
  642.  
  643. { kQATagGL_TextureWrapU/V }
  644.     kQAGL_Repeat                = 0;
  645.     kQAGL_Clamp                    = 1;
  646.  
  647. { kQATagGL_BlendSrc }
  648.     kQAGL_SourceBlend_XXX        = 0;
  649.  
  650. { kQATagGL_BlendDst }
  651.     kQAGL_DestBlend_XXX            = 0;
  652.  
  653. { kQATagGL_DrawBuffer (mask of one or more) }
  654.     kQAGL_DrawBuffer_None        = 0;
  655.     kQAGL_DrawBuffer_FrontLeft    = $01;
  656.     kQAGL_DrawBuffer_FrontRight    = $02;
  657.     kQAGL_DrawBuffer_BackLeft    = $04;
  658.     kQAGL_DrawBuffer_BackRight    = $08;
  659.     kQAGL_DrawBuffer_Front        = $03;
  660.     kQAGL_DrawBuffer_Back        = $0C;
  661.  
  662. { kQATag_FogMode }
  663.     kQAFogMode_None                = 0;                            {  no fog                                     }
  664.     kQAFogMode_Alpha            = 1;                            {  fog value is alpha                         }
  665.     kQAFogMode_Linear            = 2;                            {  fog = (end - z) / (end - start)             }
  666.     kQAFogMode_Exponential        = 3;                            {  fog = exp(-density * z)                     }
  667.     kQAFogMode_ExponentialSquared = 4;                            {  fog = exp(-density * z * density * z)     }
  668.  
  669.  
  670. { kQATag_ChannelMask }
  671.     kQAChannelMask_r            = $01;
  672.     kQAChannelMask_g            = $02;
  673.     kQAChannelMask_b            = $04;
  674.     kQAChannelMask_a            = $08;
  675.  
  676.  
  677. { kQATag_ZBufferMask }
  678.     kQAZBufferMask_Disable        = 0;
  679.     kQAZBufferMask_Enable        = 1;
  680.  
  681. { kQATag_AlphaTestFunc }
  682.     kQAAlphaTest_None            = 0;
  683.     kQAAlphaTest_LT                = 1;
  684.     kQAAlphaTest_EQ                = 2;
  685.     kQAAlphaTest_LE                = 3;
  686.     kQAAlphaTest_GT                = 4;
  687.     kQAAlphaTest_NE                = 5;
  688.     kQAAlphaTest_GE                = 6;
  689.     kQAAlphaTest_True            = 7;
  690.  
  691.  
  692. { flags for QAAccess__xxx }
  693.     kQANoCopyNeeded                = $01;
  694.  
  695.  
  696. {***********************************************************************************************
  697.  *
  698.  * Constants used as function parameters.
  699.  *
  700.  **********************************************************************************************}
  701. {
  702.  * TQAVertexMode is a parameter to QADrawVGouraud() and QADrawVTexture() that specifies how
  703.  * to interpret and draw the vertex array.
  704.  }
  705.  
  706. TYPE
  707.     TQAVertexMode                 = SInt32;
  708. CONST
  709.     kQAVertexMode_Point            = 0;                            {  Draw nVertices points  }
  710.     kQAVertexMode_Line            = 1;                            {  Draw nVertices/2 line segments  }
  711.     kQAVertexMode_Polyline        = 2;                            {  Draw nVertices-1 connected line segments  }
  712.     kQAVertexMode_Tri            = 3;                            {  Draw nVertices/3 triangles  }
  713.     kQAVertexMode_Strip            = 4;                            {  Draw nVertices-2 triangles as a strip  }
  714.     kQAVertexMode_Fan            = 5;                            {  Draw nVertices-2 triangles as a fan from v0  }
  715.     kQAVertexMode_NumModes        = 6;
  716.  
  717. {
  718.  * TQAGestaltSelector is a parameter to QAEngineGestalt(). It selects which gestalt
  719.  * parameter will be copied into 'response'.
  720.  }
  721.  
  722. TYPE
  723.     TQAGestaltSelector             = SInt32;
  724. CONST
  725.     kQAGestalt_OptionalFeatures    = 0;                            {  Mask of one or more kQAOptional_xxx  }
  726.     kQAGestalt_FastFeatures        = 1;                            {  Mask of one or more kQAFast_xxx  }
  727.     kQAGestalt_VendorID            = 2;                            {  Vendor ID  }
  728.     kQAGestalt_EngineID            = 3;                            {  Engine ID  }
  729.     kQAGestalt_Revision            = 4;                            {  Revision number of this engine  }
  730.     kQAGestalt_ASCIINameLength    = 5;                            {  strlen (asciiName)  }
  731.     kQAGestalt_ASCIIName        = 6;                            {  Causes strcpy (response, asciiName)  }
  732.     kQAGestalt_TextureMemory    = 7;                            {  amount of texture RAM currently available  }
  733.     kQAGestalt_FastTextureMemory = 8;                            {  amount of texture RAM currently available  }
  734.     kQAGestalt_DrawContextPixelTypesAllowed = 9;                {  returns all the draw context pixel types supported by the RAVE engine  }
  735.     kQAGestalt_DrawContextPixelTypesPreferred = 10;                {  returns all the draw context pixel types that are preferred by the RAVE engine.  }
  736.     kQAGestalt_TexturePixelTypesAllowed = 11;                    {  returns all the texture pixel types that are supported by the RAVE engine  }
  737.     kQAGestalt_TexturePixelTypesPreferred = 12;                    {  returns all the texture pixel types that are preferred by the RAVE engine. }
  738.     kQAGestalt_BitmapPixelTypesAllowed = 13;                    {  returns all the bitmap pixel types that are supported by the RAVE engine.  }
  739.     kQAGestalt_BitmapPixelTypesPreferred = 14;                    {  returns all the bitmap pixel types that are preferred by the RAVE engine.  }
  740.     kQAGestalt_OptionalFeatures2 = 15;                            {  Mask of one or more kQAOptional2_xxx  }
  741.     kQAGestalt_MultiTextureMax    = 16;                            {  max number of multi textures supported by this engine  }
  742.     kQAGestalt_NumSelectors        = 17;
  743.     kQAGestalt_EngineSpecific_Minimum = 1000;                    {  all gestalts here and above are for engine specific purposes  }
  744.  
  745. {
  746.  * TQAMethodSelector is a parameter to QASetNoticeMethod to select the notice method
  747.  }
  748. {$IFC RAVE_OBSOLETE }
  749.  
  750. TYPE
  751.     TQAMethodSelector             = SInt32;
  752. CONST
  753.     kQAMethod_RenderCompletion    = 0;                            {  Called when rendering has completed and buffers swapped  }
  754.     kQAMethod_DisplayModeChanged = 1;                            {  Called when a display mode has changed  }
  755.     kQAMethod_ReloadTextures    = 2;                            {  Called when texture memory has been invalidated  }
  756.     kQAMethod_BufferInitialize    = 3;                            {  Called when a buffer needs to be initialized  }
  757.     kQAMethod_BufferComposite    = 4;                            {  Called when rendering is finished and its safe to composite  }
  758.     kQAMethod_NumSelectors        = 5;
  759.  
  760. {$ELSEC}
  761.  
  762. TYPE
  763.     TQAMethodSelector             = SInt32;
  764. CONST
  765.     kQAMethod_RenderCompletion    = 0;                            {  Called when rendering has completed and buffers swapped  }
  766.     kQAMethod_DisplayModeChanged = 1;                            {  Called when a display mode has changed  }
  767.     kQAMethod_ReloadTextures    = 2;                            {  Called when texture memory has been invalidated  }
  768.     kQAMethod_ImageBufferInitialize = 3;                        {  Called when a buffer needs to be initialized  }
  769.     kQAMethod_ImageBuffer2DComposite = 4;                        {  Called when rendering is finished and its safe to composite  }
  770.     kQAMethod_NumSelectors        = 5;
  771.  
  772. {$ENDC}  {RAVE_OBSOLETE}
  773.  
  774. {
  775.  * kQATriFlags_xxx are ORed together to generate the 'flags' parameter
  776.  * to QADrawTriGouraud() and QADrawTriTexture().
  777.  }
  778.     kQATriFlags_None            = 0;                            {  No flags (triangle is front-facing or don't care)  }
  779.     kQATriFlags_Backfacing        = $01;                            {  Triangle is back-facing  }
  780.  
  781. {
  782.  * kQATexture_xxx are ORed together to generate the 'flags' parameter to QATextureNew().
  783.  }
  784.     kQATexture_None                = 0;                            {  No flags  }
  785.     kQATexture_Lock                = $01;                            {  Don't swap this texture out  }
  786.     kQATexture_Mipmap            = $02;                            {  This texture is mipmapped  }
  787.     kQATexture_NoCompression    = $04;                            {  Do not compress this texture  }
  788.     kQATexture_HighCompression    = $08;                            {  Compress texture, even if it takes a while  }
  789.     kQATexture_NonRelocatable    = $10;                            {  Image buffer in VRAM should be non-relocatable  }
  790.     kQATexture_NoCopy            = $20;                            {  Don't copy image to VRAM when creating it  }
  791.     kQATexture_FlipOrigin        = $40;                            {  The image(s) is(are) in a bottom-up format. (The image(s) is(are) flipped vertically.)  }
  792.     kQATexture_PriorityBits        = $F0000000;                    {  Texture priority: 4 upper bits for 16 levels of priority  }
  793.  
  794. {
  795.  * kQABitmap_xxx are ORed together to generate the 'flags' parameter to QABitmapNew().
  796.  }
  797.     kQABitmap_None                = 0;                            {  No flags  }
  798.     kQABitmap_Lock                = $02;                            {  Don't swap this bitmap out  }
  799.     kQABitmap_NoCompression        = $04;                            {  Do not compress this bitmap  }
  800.     kQABitmap_HighCompression    = $08;                            {  Compress bitmap, even if it takes a while  }
  801.     kQABitmap_NonRelocatable    = $10;                            {  Image buffer in VRAM should be non-relocatable  }
  802.     kQABitmap_NoCopy            = $20;                            {  Don't copy image to VRAM when creating it  }
  803.     kQABitmap_FlipOrigin        = $40;                            {  The image is in a bottom-up format. (The image is flipped vertically.)  }
  804.     kQABitmap_PriorityBits        = $F0000000;                    {  Bitmap priority: 4 upper bits for 16 levels of priority  }
  805.  
  806. {
  807.  * kQAContext_xxx are ORed together to generate the 'flags' parameter for QADrawContextNew().
  808.  }
  809.     kQAContext_None                = 0;                            {  No flags  }
  810.     kQAContext_NoZBuffer        = $01;                            {  No hidden surface removal  }
  811.     kQAContext_DeepZ            = $02;                            {  Hidden surface precision >= 24 bits  }
  812.     kQAContext_DoubleBuffer        = $04;                            {  Double buffered window  }
  813.     kQAContext_Cache            = $08;                            {  This is a cache context  }
  814.     kQAContext_NoDither            = $10;                            {  No dithering, straight color banding  }
  815.     kQAContext_Scale            = $20;                            {  The draw context is to be scaled.  The front buffer is a different size than the back buffer.  }
  816.     kQAContext_NonRelocatable    = $40;                            {  The back buffer and the z buffer must not move in memory  }
  817.     kQAContext_EngineSpecific1    = $10000000;                    {  engine specific flag # 1  }
  818.     kQAContext_EngineSpecific2    = $20000000;                    {  engine specific flag # 2  }
  819.     kQAContext_EngineSpecific3    = $40000000;                    {  engine specific flag # 3  }
  820.     kQAContext_EngineSpecific4    = $80000000;                    {  engine specific flag # 4  }
  821.  
  822. {
  823.  * kQAOptional_xxx are ORed together to generate the kQAGestalt_OptionalFeatures response
  824.  * from QAEngineGestalt().
  825.  }
  826.     kQAOptional_None            = 0;                            {  No optional features  }
  827.     kQAOptional_DeepZ            = $01;                            {  Hidden surface precision >= 24 bits  }
  828.     kQAOptional_Texture            = $02;                            {  Texture mapping  }
  829.     kQAOptional_TextureHQ        = $04;                            {  High quality texture (tri-linear mip or better)  }
  830.     kQAOptional_TextureColor    = $08;                            {  Full color modulation and highlight of textures  }
  831.     kQAOptional_Blend            = $10;                            {  Transparency blending of RGB  }
  832.     kQAOptional_BlendAlpha        = $20;                            {  Transparency blending includes alpha channel  }
  833.     kQAOptional_Antialias        = $40;                            {  Antialiased rendering  }
  834.     kQAOptional_ZSorted            = $80;                            {  Z sorted rendering (for transparency, etc.)  }
  835.     kQAOptional_PerspectiveZ    = $0100;                        {  Hidden surface removal using InvW instead of Z  }
  836.     kQAOptional_OpenGL            = $0200;                        {  Extended rasterization features for OpenGLâ„¢  }
  837.     kQAOptional_NoClear            = $0400;                        {  This drawing engine doesn't clear before drawing  }
  838.     kQAOptional_CSG                = $0800;                        {  kQATag_CSGxxx are implemented  }
  839.     kQAOptional_BoundToDevice    = $1000;                        {  This engine is tightly bound to GDevice  }
  840.     kQAOptional_CL4                = $2000;                        {  This engine suports kQAPixel_CL4  }
  841.     kQAOptional_CL8                = $4000;                        {  This engine suports kQAPixel_CL8  }
  842.     kQAOptional_BufferComposite    = $8000;                        {  This engine can composite with initial buffer contents  }
  843.     kQAOptional_NoDither        = $00010000;                    {  This engine can draw with no dithering  }
  844.     kQAOptional_FogAlpha        = $00020000;                    {  This engine suports alpha based fog  }
  845.     kQAOptional_FogDepth        = $00040000;                    {  This engine suports depth based fog  }
  846.     kQAOptional_MultiTextures    = $00080000;                    {  This bit set if engine supports texture compositing  }
  847.     kQAOptional_MipmapBias        = $00100000;                    {  This bit is set if the engine supports mipmap selection bias  }
  848.     kQAOptional_ChannelMask        = $00200000;
  849.     kQAOptional_ZBufferMask        = $00400000;
  850.     kQAOptional_AlphaTest        = $00800000;                    {  this engine supports alpha testing  }
  851.     kQAOptional_AccessTexture    = $01000000;                    {  if engine supports access to texture  }
  852.     kQAOptional_AccessBitmap    = $02000000;                    {  if engine supports access to bitmaps  }
  853.     kQAOptional_AccessDrawBuffer = $04000000;                    {  if engine supports access to draw buffer  }
  854.     kQAOptional_AccessZBuffer    = $08000000;                    {  if engine supports access to zbuffer  }
  855.     kQAOptional_ClearDrawBuffer    = $10000000;                    {  if engine supports QAClearDrawBuffer()  }
  856.     kQAOptional_ClearZBuffer    = $20000000;                    {  if engine supports QAClearZBuffer()  }
  857.     kQAOptional_OffscreenDrawContexts = $40000000;                {  if engine supports TQADeviceOffscreen  }
  858.  
  859. {
  860.  * kQAOptional2_xxx are ORed together to generate the kQAGestalt_OptionalFeatures2 response
  861.  * from QAEngineGestalt().
  862.  }
  863.     kQAOptional2_None            = 0;
  864.     kQAOptional2_TextureDrawContexts = $02;                        {  if engine supports QATextureNewFromDrawContext()  }
  865.     kQAOptional2_BitmapDrawContexts = $04;                        {  if engine supports QABitmapNewFromDrawContext()  }
  866.     kQAOptional2_Busy            = $08;                            {  if engine supports QABusy()  }
  867.     kQAOptional2_SwapBuffers    = $10;                            {  if engine supports QASwapBuffers()  }
  868.     kQAOptional2_Chromakey        = $20;                            {  if engine supports chromakeying via kQATag_Chromakey_xxx  }
  869.     kQAOptional2_NonRelocatable    = $40;                            {  if engine supports nonrelocatable texture & bitmap image buffers in VRAM  }
  870.     kQAOptional2_NoCopy            = $80;                            {  if engine supports ability to not copy texture & bitmap image to VRAM  }
  871.     kQAOptional2_PriorityBits    = $0100;                        {  if engine supports texture & bitmap priority levels  }
  872.     kQAOptional2_FlipOrigin        = $0200;                        {  if engine supports textures & bitmaps that are vertically flipped  }
  873.     kQAOptional2_BitmapScale    = $0400;                        {  if engine supports scaled bitmap drawing  }
  874.     kQAOptional2_DrawContextScale = $0800;                        {  if engine supports scaled draw contexts  }
  875.     kQAOptional2_DrawContextNonRelocatable = $1000;                {  if engine supports draw contexts with non relocatable buffers  }
  876.  
  877.  
  878. {
  879.  * kQAFast_xxx are ORed together to generate the kQAGestalt_FastFeatures response
  880.  * from QAEngineGestalt().
  881.  }
  882.     kQAFast_None                = 0;                            {  No accelerated features  }
  883.     kQAFast_Line                = $01;                            {  Line drawing  }
  884.     kQAFast_Gouraud                = $02;                            {  Gouraud shaded triangles  }
  885.     kQAFast_Texture                = $04;                            {  Texture mapped triangles  }
  886.     kQAFast_TextureHQ            = $08;                            {  High quality texture (tri-linear mip or better)  }
  887.     kQAFast_Blend                = $10;                            {  Transparency blending  }
  888.     kQAFast_Antialiasing        = $20;                            {  Antialiased rendering  }
  889.     kQAFast_ZSorted                = $40;                            {  Z sorted rendering of non-opaque objects  }
  890.     kQAFast_CL4                    = $80;                            {  This engine accelerates kQAPixel_CL4  }
  891.     kQAFast_CL8                    = $0100;                        {  This engine accelerates kQAPixel_CL8  }
  892.     kQAFast_FogAlpha            = $0200;                        {  This engine accelerates alpha based fog  }
  893.     kQAFast_FogDepth            = $0400;                        {  This engine accelerates depth based fog  }
  894.     kQAFast_MultiTextures        = $0800;                        {  This engine accelerates texture compositing  }
  895.     kQAFast_BitmapScale            = $1000;                        {  This engine accelerates scaled bitmap drawing  }
  896.     kQAFast_DrawContextScale    = $2000;                        {  This engine accelerates scaled draw contexts  }
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903. {*******************************************************************
  904.  * TQAVersion sets the TQADrawContext 'version' field. It is set by
  905.  * the manager to indicate the version of the TQADrawContext structure.
  906.  ******************************************************************}
  907.  
  908. TYPE
  909.     TQAVersion                     = SInt32;
  910. CONST
  911.     kQAVersion_Prerelease        = 0;
  912.     kQAVersion_1_0                = 1;
  913.     kQAVersion_1_0_5            = 2;                            {  Added tri mesh functions, color tables  }
  914.     kQAVersion_1_5                = 3;                            {  Added call backs, texture compression, and new error return code  }
  915.     kQAVersion_1_6                = 4;                            {  Added QAAccess_xxx, fog, _Options2, Clear_xxx, etc.  }
  916.  
  917.  
  918.  
  919. {**********************************************************************
  920.  * TQADrawContext structure holds method pointers.
  921.  * This is a forward refrence. The structure is defined later.
  922.  *********************************************************************}
  923.  
  924. TYPE
  925.     TQADrawContextPtr = ^TQADrawContext;
  926. {***********************************************************************************************
  927.  *
  928.  * Typedefs of draw method functions provided by the drawing engine. One function pointer
  929.  * for each of these function types in stored in the TQADrawContext public data structure.
  930.  *
  931.  * These functions should be accessed through the QA<function>(context,...) macros,
  932.  * defined above.
  933.  *
  934.  **********************************************************************************************}
  935. {$IFC TYPED_FUNCTION_POINTERS}
  936.     TQAStandardNoticeMethod = PROCEDURE({CONST}VAR drawContext: TQADrawContext; refCon: UNIV Ptr); C;
  937. {$ELSEC}
  938.     TQAStandardNoticeMethod = ProcPtr;
  939. {$ENDC}
  940.  
  941. {$IFC TYPED_FUNCTION_POINTERS}
  942.     TQABufferNoticeMethod = PROCEDURE({CONST}VAR drawContext: TQADrawContext; {CONST}VAR buffer: TQADevice; {CONST}VAR dirtyRect: TQARect; refCon: UNIV Ptr); C;
  943. {$ELSEC}
  944.     TQABufferNoticeMethod = ProcPtr;
  945. {$ENDC}
  946.  
  947.     TQANoticeMethodPtr = ^TQANoticeMethod;
  948.     TQANoticeMethod = RECORD
  949.         CASE INTEGER OF
  950.         0: (
  951.             standardNoticeMethod: TQAStandardNoticeMethod;                {  Used for non-buffer related methods  }
  952.             );
  953.         1: (
  954.             bufferNoticeMethod:    TQABufferNoticeMethod;                    {  Used for buffer handling methods  }
  955.             );
  956.     END;
  957.  
  958. {$IFC TYPED_FUNCTION_POINTERS}
  959.     TQASetFloat = PROCEDURE(VAR drawContext: TQADrawContext; tag: TQATagFloat; newValue: Single); C;
  960. {$ELSEC}
  961.     TQASetFloat = ProcPtr;
  962. {$ENDC}
  963.  
  964. {$IFC TYPED_FUNCTION_POINTERS}
  965.     TQASetInt = PROCEDURE(VAR drawContext: TQADrawContext; tag: TQATagInt; newValue: UInt32); C;
  966. {$ELSEC}
  967.     TQASetInt = ProcPtr;
  968. {$ENDC}
  969.  
  970. {$IFC TYPED_FUNCTION_POINTERS}
  971.     TQASetPtr = PROCEDURE(VAR drawContext: TQADrawContext; tag: TQATagPtr; newValue: UNIV Ptr); C;
  972. {$ELSEC}
  973.     TQASetPtr = ProcPtr;
  974. {$ENDC}
  975.  
  976. {$IFC TYPED_FUNCTION_POINTERS}
  977.     TQAGetFloat = FUNCTION({CONST}VAR drawContext: TQADrawContext; tag: TQATagFloat): Single; C;
  978. {$ELSEC}
  979.     TQAGetFloat = ProcPtr;
  980. {$ENDC}
  981.  
  982. {$IFC TYPED_FUNCTION_POINTERS}
  983.     TQAGetInt = FUNCTION({CONST}VAR drawContext: TQADrawContext; tag: TQATagInt): UInt32; C;
  984. {$ELSEC}
  985.     TQAGetInt = ProcPtr;
  986. {$ENDC}
  987.  
  988. {$IFC TYPED_FUNCTION_POINTERS}
  989.     TQAGetPtr = FUNCTION({CONST}VAR drawContext: TQADrawContext; tag: TQATagPtr): Ptr; C;
  990. {$ELSEC}
  991.     TQAGetPtr = ProcPtr;
  992. {$ENDC}
  993.  
  994. {$IFC TYPED_FUNCTION_POINTERS}
  995.     TQADrawPoint = PROCEDURE({CONST}VAR drawContext: TQADrawContext; {CONST}VAR v: TQAVGouraud); C;
  996. {$ELSEC}
  997.     TQADrawPoint = ProcPtr;
  998. {$ENDC}
  999.  
  1000. {$IFC TYPED_FUNCTION_POINTERS}
  1001.     TQADrawLine = PROCEDURE({CONST}VAR drawContext: TQADrawContext; {CONST}VAR v0: TQAVGouraud; {CONST}VAR v1: TQAVGouraud); C;
  1002. {$ELSEC}
  1003.     TQADrawLine = ProcPtr;
  1004. {$ENDC}
  1005.  
  1006. {$IFC TYPED_FUNCTION_POINTERS}
  1007.     TQADrawTriGouraud = PROCEDURE({CONST}VAR drawContext: TQADrawContext; {CONST}VAR v0: TQAVGouraud; {CONST}VAR v1: TQAVGouraud; {CONST}VAR v2: TQAVGouraud; flags: UInt32); C;
  1008. {$ELSEC}
  1009.     TQADrawTriGouraud = ProcPtr;
  1010. {$ENDC}
  1011.  
  1012. {$IFC TYPED_FUNCTION_POINTERS}
  1013.     TQADrawTriTexture = PROCEDURE({CONST}VAR drawContext: TQADrawContext; {CONST}VAR v0: TQAVTexture; {CONST}VAR v1: TQAVTexture; {CONST}VAR v2: TQAVTexture; flags: UInt32); C;
  1014. {$ELSEC}
  1015.     TQADrawTriTexture = ProcPtr;
  1016. {$ENDC}
  1017.  
  1018. {$IFC TYPED_FUNCTION_POINTERS}
  1019.     TQASubmitVerticesGouraud = PROCEDURE({CONST}VAR drawContext: TQADrawContext; nVertices: UInt32; {CONST}VAR vertices: TQAVGouraud); C;
  1020. {$ELSEC}
  1021.     TQASubmitVerticesGouraud = ProcPtr;
  1022. {$ENDC}
  1023.  
  1024. {$IFC TYPED_FUNCTION_POINTERS}
  1025.     TQASubmitVerticesTexture = PROCEDURE({CONST}VAR drawContext: TQADrawContext; nVertices: UInt32; {CONST}VAR vertices: TQAVTexture); C;
  1026. {$ELSEC}
  1027.     TQASubmitVerticesTexture = ProcPtr;
  1028. {$ENDC}
  1029.  
  1030. {$IFC TYPED_FUNCTION_POINTERS}
  1031.     TQADrawTriMeshGouraud = PROCEDURE({CONST}VAR drawContext: TQADrawContext; nTriangles: UInt32; {CONST}VAR triangles: TQAIndexedTriangle); C;
  1032. {$ELSEC}
  1033.     TQADrawTriMeshGouraud = ProcPtr;
  1034. {$ENDC}
  1035.  
  1036. {$IFC TYPED_FUNCTION_POINTERS}
  1037.     TQADrawTriMeshTexture = PROCEDURE({CONST}VAR drawContext: TQADrawContext; nTriangles: UInt32; {CONST}VAR triangles: TQAIndexedTriangle); C;
  1038. {$ELSEC}
  1039.     TQADrawTriMeshTexture = ProcPtr;
  1040. {$ENDC}
  1041.  
  1042. {$IFC TYPED_FUNCTION_POINTERS}
  1043.     TQADrawVGouraud = PROCEDURE({CONST}VAR drawContext: TQADrawContext; nVertices: UInt32; vertexMode: TQAVertexMode; {CONST}VAR vertices: TQAVGouraud; {CONST}VAR flags: UInt32); C;
  1044. {$ELSEC}
  1045.     TQADrawVGouraud = ProcPtr;
  1046. {$ENDC}
  1047.  
  1048. {$IFC TYPED_FUNCTION_POINTERS}
  1049.     TQADrawVTexture = PROCEDURE({CONST}VAR drawContext: TQADrawContext; nVertices: UInt32; vertexMode: TQAVertexMode; {CONST}VAR vertices: TQAVTexture; {CONST}VAR flags: UInt32); C;
  1050. {$ELSEC}
  1051.     TQADrawVTexture = ProcPtr;
  1052. {$ENDC}
  1053.  
  1054. {$IFC TYPED_FUNCTION_POINTERS}
  1055.     TQADrawBitmap = PROCEDURE({CONST}VAR drawContext: TQADrawContext; {CONST}VAR v: TQAVGouraud; VAR bitmap: TQABitmap); C;
  1056. {$ELSEC}
  1057.     TQADrawBitmap = ProcPtr;
  1058. {$ENDC}
  1059.  
  1060. {$IFC TYPED_FUNCTION_POINTERS}
  1061.     TQARenderStart = PROCEDURE({CONST}VAR drawContext: TQADrawContext; {CONST}VAR dirtyRect: TQARect; {CONST}VAR initialContext: TQADrawContext); C;
  1062. {$ELSEC}
  1063.     TQARenderStart = ProcPtr;
  1064. {$ENDC}
  1065.  
  1066. {$IFC TYPED_FUNCTION_POINTERS}
  1067.     TQARenderEnd = FUNCTION({CONST}VAR drawContext: TQADrawContext; {CONST}VAR modifiedRect: TQARect): TQAError; C;
  1068. {$ELSEC}
  1069.     TQARenderEnd = ProcPtr;
  1070. {$ENDC}
  1071.  
  1072. {$IFC TYPED_FUNCTION_POINTERS}
  1073.     TQARenderAbort = FUNCTION({CONST}VAR drawContext: TQADrawContext): TQAError; C;
  1074. {$ELSEC}
  1075.     TQARenderAbort = ProcPtr;
  1076. {$ENDC}
  1077.  
  1078. {$IFC TYPED_FUNCTION_POINTERS}
  1079.     TQAFlush = FUNCTION({CONST}VAR drawContext: TQADrawContext): TQAError; C;
  1080. {$ELSEC}
  1081.     TQAFlush = ProcPtr;
  1082. {$ENDC}
  1083.  
  1084. {$IFC TYPED_FUNCTION_POINTERS}
  1085.     TQASync = FUNCTION({CONST}VAR drawContext: TQADrawContext): TQAError; C;
  1086. {$ELSEC}
  1087.     TQASync = ProcPtr;
  1088. {$ENDC}
  1089.  
  1090. {$IFC TYPED_FUNCTION_POINTERS}
  1091.     TQASetNoticeMethod = FUNCTION({CONST}VAR drawContext: TQADrawContext; method: TQAMethodSelector; completionCallBack: TQANoticeMethod; refCon: UNIV Ptr): TQAError; C;
  1092. {$ELSEC}
  1093.     TQASetNoticeMethod = ProcPtr;
  1094. {$ENDC}
  1095.  
  1096. {$IFC TYPED_FUNCTION_POINTERS}
  1097.     TQAGetNoticeMethod = FUNCTION({CONST}VAR drawContext: TQADrawContext; method: TQAMethodSelector; VAR completionCallBack: TQANoticeMethod; VAR refCon: UNIV Ptr): TQAError; C;
  1098. {$ELSEC}
  1099.     TQAGetNoticeMethod = ProcPtr;
  1100. {$ENDC}
  1101.  
  1102. {$IFC TYPED_FUNCTION_POINTERS}
  1103.     TQASubmitMultiTextureParams = PROCEDURE({CONST}VAR drawContext: TQADrawContext; nParams: UInt32; {CONST}VAR params: TQAVMultiTexture); C;
  1104. {$ELSEC}
  1105.     TQASubmitMultiTextureParams = ProcPtr;
  1106. {$ENDC}
  1107.  
  1108. {$IFC TYPED_FUNCTION_POINTERS}
  1109.     TQAAccessDrawBuffer = FUNCTION({CONST}VAR drawContext: TQADrawContext; VAR buffer: TQAPixelBuffer): TQAError; C;
  1110. {$ELSEC}
  1111.     TQAAccessDrawBuffer = ProcPtr;
  1112. {$ENDC}
  1113.  
  1114. {$IFC TYPED_FUNCTION_POINTERS}
  1115.     TQAAccessDrawBufferEnd = FUNCTION({CONST}VAR drawContext: TQADrawContext; {CONST}VAR dirtyRect: TQARect): TQAError; C;
  1116. {$ELSEC}
  1117.     TQAAccessDrawBufferEnd = ProcPtr;
  1118. {$ENDC}
  1119.  
  1120. {$IFC TYPED_FUNCTION_POINTERS}
  1121.     TQAAccessZBuffer = FUNCTION({CONST}VAR drawContext: TQADrawContext; VAR buffer: TQAZBuffer): TQAError; C;
  1122. {$ELSEC}
  1123.     TQAAccessZBuffer = ProcPtr;
  1124. {$ENDC}
  1125.  
  1126. {$IFC TYPED_FUNCTION_POINTERS}
  1127.     TQAAccessZBufferEnd = FUNCTION({CONST}VAR drawContext: TQADrawContext; {CONST}VAR dirtyRect: TQARect): TQAError; C;
  1128. {$ELSEC}
  1129.     TQAAccessZBufferEnd = ProcPtr;
  1130. {$ENDC}
  1131.  
  1132. {$IFC TYPED_FUNCTION_POINTERS}
  1133.     TQAClearDrawBuffer = FUNCTION({CONST}VAR drawContext: TQADrawContext; {CONST}VAR rect: TQARect; {CONST}VAR initialContext: TQADrawContext): TQAError; C;
  1134. {$ELSEC}
  1135.     TQAClearDrawBuffer = ProcPtr;
  1136. {$ENDC}
  1137.  
  1138. {$IFC TYPED_FUNCTION_POINTERS}
  1139.     TQAClearZBuffer = FUNCTION({CONST}VAR drawContext: TQADrawContext; {CONST}VAR rect: TQARect; {CONST}VAR initialContext: TQADrawContext): TQAError; C;
  1140. {$ELSEC}
  1141.     TQAClearZBuffer = ProcPtr;
  1142. {$ENDC}
  1143.  
  1144. {$IFC TYPED_FUNCTION_POINTERS}
  1145.     TQATextureNewFromDrawContext = FUNCTION({CONST}VAR drawContext: TQADrawContext; flags: UInt32; VAR newTexture: TQATexturePtr): TQAError; C;
  1146. {$ELSEC}
  1147.     TQATextureNewFromDrawContext = ProcPtr;
  1148. {$ENDC}
  1149.  
  1150. {$IFC TYPED_FUNCTION_POINTERS}
  1151.     TQABitmapNewFromDrawContext = FUNCTION({CONST}VAR drawContext: TQADrawContext; flags: UInt32; VAR newBitmap: TQABitmapPtr): TQAError; C;
  1152. {$ELSEC}
  1153.     TQABitmapNewFromDrawContext = ProcPtr;
  1154. {$ENDC}
  1155.  
  1156. {$IFC TYPED_FUNCTION_POINTERS}
  1157.     TQABusy = FUNCTION({CONST}VAR drawContext: TQADrawContext): ByteParameter; C;
  1158. {$ELSEC}
  1159.     TQABusy = ProcPtr;
  1160. {$ENDC}
  1161.  
  1162. {$IFC TYPED_FUNCTION_POINTERS}
  1163.     TQASwapBuffers = FUNCTION({CONST}VAR drawContext: TQADrawContext; {CONST}VAR dirtyRect: TQARect): TQAError; C;
  1164. {$ELSEC}
  1165.     TQASwapBuffers = ProcPtr;
  1166. {$ENDC}
  1167.  
  1168. {***********************************************************************************************
  1169.  *
  1170.  * Public TQADrawContext structure. This contains function pointers for the chosen
  1171.  * drawing engine.
  1172.  *
  1173.  **********************************************************************************************}
  1174.     TQADrawContext = RECORD
  1175.         drawPrivate:            TQADrawPrivatePtr;                        {  Engine's private data for this context  }
  1176.         version:                TQAVersion;                                {  Version number  }
  1177.         setFloat:                TQASetFloat;                            {  Method: Set a float state variable  }
  1178.         setInt:                    TQASetInt;                                {  Method: Set an unsigned long state variable  }
  1179.         setPtr:                    TQASetPtr;                                {  Method: Set an unsigned long state variable  }
  1180.         getFloat:                TQAGetFloat;                            {  Method: Get a float state variable  }
  1181.         getInt:                    TQAGetInt;                                {  Method: Get an unsigned long state variable  }
  1182.         getPtr:                    TQAGetPtr;                                {  Method: Get an pointer state variable  }
  1183.         drawPoint:                TQADrawPoint;                            {  Method: Draw a point  }
  1184.         drawLine:                TQADrawLine;                            {  Method: Draw a line  }
  1185.         drawTriGouraud:            TQADrawTriGouraud;                        {  Method: Draw a Gouraud shaded triangle  }
  1186.         drawTriTexture:            TQADrawTriTexture;                        {  Method: Draw a texture mapped triangle  }
  1187.         drawVGouraud:            TQADrawVGouraud;                        {  Method: Draw Gouraud vertices  }
  1188.         drawVTexture:            TQADrawVTexture;                        {  Method: Draw texture vertices  }
  1189.         drawBitmap:                TQADrawBitmap;                            {  Method: Draw a bitmap  }
  1190.         renderStart:            TQARenderStart;                            {  Method: Initialize for rendering  }
  1191.         renderEnd:                TQARenderEnd;                            {  Method: Complete rendering and display  }
  1192.         renderAbort:            TQARenderAbort;                            {  Method: Abort any outstanding rendering (blocking)  }
  1193.         flush:                    TQAFlush;                                {  Method: Start render of any queued commands (non-blocking)  }
  1194.         sync:                    TQASync;                                {  Method: Wait for completion of all rendering (blocking)  }
  1195.         submitVerticesGouraud:    TQASubmitVerticesGouraud;                {  Method: Submit Gouraud vertices for trimesh  }
  1196.         submitVerticesTexture:    TQASubmitVerticesTexture;                {  Method: Submit Texture vertices for trimesh  }
  1197.         drawTriMeshGouraud:        TQADrawTriMeshGouraud;                    {  Method: Draw a Gouraud triangle mesh  }
  1198.         drawTriMeshTexture:        TQADrawTriMeshTexture;                    {  Method: Draw a Texture triangle mesh  }
  1199.         setNoticeMethod:        TQASetNoticeMethod;                        {  Method: Set a notice method  }
  1200.         getNoticeMethod:        TQAGetNoticeMethod;                        {  Method: Get a notice method  }
  1201.         submitMultiTextureParams: TQASubmitMultiTextureParams;            {  Method: Submit Secondary texture params  }
  1202.         accessDrawBuffer:        TQAAccessDrawBuffer;
  1203.         accessDrawBufferEnd:    TQAAccessDrawBufferEnd;
  1204.         accessZBuffer:            TQAAccessZBuffer;
  1205.         accessZBufferEnd:        TQAAccessZBufferEnd;
  1206.         clearDrawBuffer:        TQAClearDrawBuffer;
  1207.         clearZBuffer:            TQAClearZBuffer;
  1208.         textureFromContext:        TQATextureNewFromDrawContext;
  1209.         bitmapFromContext:        TQABitmapNewFromDrawContext;
  1210.         busy:                    TQABusy;
  1211.         swapBuffers:            TQASwapBuffers;
  1212.     END;
  1213.  
  1214. {***********************************************************************************************
  1215.  *
  1216.  * Acceleration manager function prototypes.
  1217.  *
  1218.  **********************************************************************************************}
  1219. FUNCTION QADrawContextNew({CONST}VAR device: TQADevice; {CONST}VAR rect: TQARect; {CONST}VAR clip: TQAClip; {CONST}VAR engine: TQAEngine; flags: UInt32; VAR newDrawContext: TQADrawContextPtr): TQAError; C;
  1220. PROCEDURE QADrawContextDelete(VAR drawContext: TQADrawContext); C;
  1221. FUNCTION QAColorTableNew({CONST}VAR engine: TQAEngine; tableType: TQAColorTableType; pixelData: UNIV Ptr; transparentIndexFlag: LONGINT; VAR newTable: TQAColorTablePtr): TQAError; C;
  1222. PROCEDURE QAColorTableDelete({CONST}VAR engine: TQAEngine; VAR colorTable: TQAColorTable); C;
  1223. FUNCTION QATextureNew({CONST}VAR engine: TQAEngine; flags: UInt32; pixelType: TQAImagePixelType; {CONST}VAR images: TQAImage; VAR newTexture: TQATexturePtr): TQAError; C;
  1224. FUNCTION QATextureDetach({CONST}VAR engine: TQAEngine; VAR texture: TQATexture): TQAError; C;
  1225. PROCEDURE QATextureDelete({CONST}VAR engine: TQAEngine; VAR texture: TQATexture); C;
  1226. FUNCTION QATextureBindColorTable({CONST}VAR engine: TQAEngine; VAR texture: TQATexture; VAR colorTable: TQAColorTable): TQAError; C;
  1227. FUNCTION QABitmapNew({CONST}VAR engine: TQAEngine; flags: UInt32; pixelType: TQAImagePixelType; {CONST}VAR image: TQAImage; VAR newBitmap: TQABitmapPtr): TQAError; C;
  1228. FUNCTION QABitmapDetach({CONST}VAR engine: TQAEngine; VAR bitmap: TQABitmap): TQAError; C;
  1229. PROCEDURE QABitmapDelete({CONST}VAR engine: TQAEngine; VAR bitmap: TQABitmap); C;
  1230. FUNCTION QABitmapBindColorTable({CONST}VAR engine: TQAEngine; VAR bitmap: TQABitmap; VAR colorTable: TQAColorTable): TQAError; C;
  1231. FUNCTION QADeviceGetFirstEngine({CONST}VAR device: TQADevice): TQAEnginePtr; C;
  1232. FUNCTION QADeviceGetNextEngine({CONST}VAR device: TQADevice; {CONST}VAR currentEngine: TQAEngine): TQAEnginePtr; C;
  1233. FUNCTION QAEngineCheckDevice({CONST}VAR engine: TQAEngine; {CONST}VAR device: TQADevice): TQAError; C;
  1234. FUNCTION QAEngineGestalt({CONST}VAR engine: TQAEngine; selector: TQAGestaltSelector; response: UNIV Ptr): TQAError; C;
  1235. FUNCTION QAEngineEnable(vendorID: LONGINT; engineID: LONGINT): TQAError; C;
  1236. FUNCTION QAEngineDisable(vendorID: LONGINT; engineID: LONGINT): TQAError; C;
  1237.  
  1238. FUNCTION QAAccessTexture({CONST}VAR engine: TQAEngine; VAR texture: TQATexture; mipmapLevel: LONGINT; flags: LONGINT; VAR buffer: TQAPixelBuffer): TQAError; C;
  1239. FUNCTION QAAccessTextureEnd({CONST}VAR engine: TQAEngine; VAR texture: TQATexture; {CONST}VAR dirtyRect: TQARect): TQAError; C;
  1240. FUNCTION QAAccessBitmap({CONST}VAR engine: TQAEngine; VAR bitmap: TQABitmap; flags: LONGINT; VAR buffer: TQAPixelBuffer): TQAError; C;
  1241. FUNCTION QAAccessBitmapEnd({CONST}VAR engine: TQAEngine; VAR bitmap: TQABitmap; {CONST}VAR dirtyRect: TQARect): TQAError; C;
  1242.  
  1243.  
  1244.  
  1245. {$IFC TARGET_OS_MAC }
  1246. FUNCTION QARegisterDrawNotificationProc(VAR globalRect: Rect; proc: TQADrawNotificationProcPtr; refCon: LONGINT; VAR refNum: TQADrawNotificationProcRefNum): TQAError; C;
  1247. FUNCTION QAUnregisterDrawNotificationProc(refNum: TQADrawNotificationProcRefNum): TQAError; C;
  1248. {$ENDC}  {TARGET_OS_MAC}
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256. {$ALIGN RESET}
  1257. {$POP}
  1258.  
  1259. {$SETC UsingIncludes := RAVEIncludes}
  1260.  
  1261. {$ENDC} {__RAVE__}
  1262.  
  1263. {$IFC NOT UsingIncludes}
  1264.  END.
  1265. {$ENDC}
  1266.